<!DOCTYPE html>
{% from "macros.html" import menu %}
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>index</title>
    <style>
        h1{
            text-align: center;
        }
        #user_online{
            float: right;
            margin-right: 3px;
        }
        table{
            margin:auto;
        }
        #content{
            margin-left:100px;
        }
    </style>
    <link rel="stylesheet" href="{{ url_for ('static',filename='css/bootstrap.css')}}">
    <link rel="stylesheet" href="{{ url_for ('static',filename='css/flask.css')}}">
</head>
<body>
{{ menu(post_name,online) }}
{#<h1>阳光婚姻信息匹配管理系统</h1>#}
{#<div class="navbar-collapse collapse" id="menu">#}
{#    <ul class="nav navbar-nav">#}
{#        <li><a href="{{ url_for('regist') }}">注册页面</a></li>#}
{#        <li><a href="{{ url_for('login') }}">切换账号</a></li>#}
{#        <li><a href="{{ url_for('article') }}">回到首页</a></li>#}
{#        <li><a href="{{ url_for('information') }}">个人信息</a></li>#}
{#        <li id="selectmenu">#}
{#            <a>信息匹配</a>#}
{#            <ul id="selects" style="display: none">#}
{#                <li><a href="{{ url_for('sysselect') }}">系统匹配</a></li>#}
{#                <li><a href="{{ url_for('appointselect') }}">指定匹配</a></li>#}
{#            </ul>#}
{#        </li>#}
{#        <li id="messagemenu">#}
{#            <a>消息中心</a>#}
{#            <ul id="selects2" style="display: none">#}
{#                <li><a href="{{ url_for('sendmessage') }}">发送消息</a></li>#}
{#                <li><a href="{{ url_for('acceptmessage') }}">接受消息</a></li>#}
{#            </ul>#}
{#        </li>#}
{#        <li><a href="{{ url_for('addarticle') }}">上传话题</a></li>#}
{#    </ul>#}
{#    <h4 id="user_online">{{ post_name }}{{ online }}</h4>#}
{#    <br><br><br><br><br>#}
{#</div>#}

    <div id="content" class="panel-body">
        {% for list in list %}
            <div style="margin-bottom: 10px;border: 1px solid #000;">
                <div style="margin-left: 20px;padding-left: 0">
                    <p style="font-weight: bold;padding-top: 10px;font-size: 16px;">{{ list.username }}</p>&nbsp;

                    <h4 style="font-weight: bold;">文章ID：{{ list.articleid }}</h4>

                    <p style="text-indent: 2em">{{ list.articlecontent }}</p>

                    <p style="text-align: right;margin-right: 10px;color: #8c8c8c;font-size: 14px;">发布时间：{{ list.time }}</p>

                    <p><span style="font-weight: bold;">评论：</span><span>{{ list.articlecomment }}</span></p>

                    {% set id = list.articleid|string  %}
                    <div style="margin-bottom: 10px;">
                        <a href="/addcomment/{{ id }}">评论</a>

                        <a href="/selectcomment/{{ id }}">查看所有评论</a>
                    </div>


                </div>

            </div>

        {% endfor %}
    <div style="text-align: center">
{#{% if page>1 %}#}
{#    <a href="{{ url_for("cmsloginrecord") }}?page={{ page-1 }}">上一页</a>#}
{#{% endif %}#}
{#{% for i in range(post_times) %}#}
{#    <a href="{{ url_for("cmsloginrecord") }}?page={{ i+1 }}">{{ i+1 }}</a>#}
{#{% endfor %}#}
{#{% if page<10 %}#}
{#    <a href="{{ url_for("cmsloginrecord") }}?page={{page+1}}">下一页</a>#}
{#{% endif %}#}
</div>
    </div>
</body>
<script type="text/javascript">
    window.onload = function(){
        var selectmenu = document.getElementById("selectmenu");
        var selects = document.getElementById("selects");
        selectmenu.onmouseover = function(){
            selects.style.display = "block";
        }
        selectmenu.onmouseout = function(){
            selects.style.display = "none";
        }

        var messagemenu = document.getElementById("messagemenu");
        var selects2 = document.getElementById("selects2");
        messagemenu.onmouseover = function(){
            selects2.style.display = "block";
        }
        messagemenu.onmouseout = function(){
            selects2.style.display = "none";
        }

        var userstate = document.getElementById("userstate");
        var down = document.getElementById("down");
        userstate.onmouseover = function(){
            down.style.display = "block";
        }
        userstate.onmouseout = function(){
            down.style.display = "none";
        }
    }
</script>

</html>